from core.basic.skill import 技能
from core.basic.character import Character
from core.basic.skill import 主动技能, 被动技能


class 主动技能(主动技能):
    追加 = 0


class 技能0(主动技能):
    名称 = 'RX78追击者'
    所在等级 = 5
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 2.5
    MP = [10, 82]
    无色消耗 = 0
    data0 = [0, 844, 928, 1015, 1099, 1184, 1270, 1356, 1440, 1527, 1613, 1699, 1785, 1871, 1955, 2040, 2127, 2211, 2298, 2384, 2468, 2555, 2638, 2725, 2810, 2895, 2981, 3067, 3153, 3238, 3324, 3408, 3494, 3580, 3665,
             3750, 3837, 3922, 4008, 4094, 4177, 4264, 4349, 4436, 4522, 4608, 4693, 4778, 4865, 4949, 5034, 5120, 5205, 5292, 5376, 5462, 5548, 5633, 5719, 5804, 5888, 5975, 6060, 6146, 6232, 6317, 6403, 6488, 6575, 6658, 6744]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 7
    CP倍率 = 0


class 技能1(主动技能):
    名称 = 'Ez8自爆者'
    所在等级 = 15
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 6.5
    MP = [41, 347]
    无色消耗 = 0
    data0 = [0, 3035, 3343, 3651, 3960, 4268, 4574, 4883, 5192, 5499, 5808, 6115, 6422, 6731, 7039, 7347, 7655, 7961, 8271, 8579, 8886, 9196, 9504, 9810, 10118, 10427, 10735, 11043, 11350, 11658, 11966, 12274, 12582, 12891, 13197, 13505, 13814,
             14122, 14430, 14738, 15044, 15354, 15661, 15969, 16279, 16585, 16893, 17201, 17509, 17818, 18126, 18432, 18741, 19049, 19357, 19666, 19974, 20280, 20589, 20898, 21205, 21513, 21819, 22129, 22437, 22744, 23053, 23362, 23668, 23976, 24285]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 7


class 技能2(被动技能):
    名称 = '机械引爆'
    所在等级 = 15
    等级上限 = 20
    基础等级 = 5
    是否主动 = 1
    关联技能 = ['RX78追击者', 'Ez8自爆者', 'RX60陷阱追击者',
            '空投支援', '拦截机工厂', 'EZ10反击者', 'TX-45特攻队']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return 1.40


class 技能3(被动技能):
    名称 = '机械概论'
    所在等级 = 15
    等级上限 = 11
    基础等级 = 1
    关联技能 = ['RX78追击者', 'Ez8自爆者', 'RX60陷阱追击者', '毒蛇炮', '空战机械：风暴', '空投支援', '拦截机工厂', '盖波加之拳',
            'EZ10反击者', 'EXSZero毒蛇炮', 'TN80终结者', 'TX-45特攻队', '超时空行军', 'HS1全息机械猎手', 'GW16-瓦尔德斯坦']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.085+0.015*self.等级, 3)


class 技能4(被动技能):
    名称 = '嗜战追击者'
    所在等级 = 15
    等级上限 = 20
    基础等级 = 10
    关联技能 = ['RX78追击者']

    data0 = [0, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000,
             1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000]

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return 1.0+self.data0[self.等级]/1000


class 技能5(主动技能):
    名称 = '毒蛇炮'
    备注 = '满'
    所在等级 = 25
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 3.5
    MP = [39, 328]
    无色消耗 = 0
    data0 = [0, 147, 162, 178, 193, 207, 223, 237, 251, 268, 282, 298, 312, 327, 342, 357, 371, 389, 402, 416, 432, 446, 462, 477, 492, 507, 523, 537, 551, 566, 580, 597, 611, 627, 641, 655,
             673, 687, 701, 716, 731, 745, 761, 775, 792, 807, 821, 837, 850, 865, 880, 896, 910, 926, 940, 957, 971, 986, 1001, 1015, 1030, 1045, 1059, 1074, 1092, 1106, 1121, 1136, 1149, 1165, 1179]
    hit0 = 30
    TP成长 = 0.1
    TP上限 = 7


class 技能6(被动技能):
    名称 = '方舟反应堆'
    所在等级 = 25
    等级上限 = 20
    基础等级 = 10

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.05+0.02*self.等级, 3)


class 技能7(主动技能):
    名称 = 'RX60陷阱追击者'
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 12
    MP = [88, 741]
    无色消耗 = 0
    data0 = [0, 6847, 7541, 8236, 8931, 9627, 10320, 11014, 11709, 12404, 13098, 13794, 14488, 15183, 15876, 16571, 17267, 17962, 18655, 19350, 20045, 20738, 21434, 22129, 22824, 23519, 24212, 24908, 25602, 26296, 26991, 27686, 28380, 29075, 29770, 30464,
             31159, 31853, 32548, 33243, 33938, 34632, 35326, 36022, 36717, 37410, 38105, 38800, 39495, 40189, 40884, 41579, 42272, 42967, 43663, 44358, 45051, 45746, 46440, 47135, 47830, 48525, 49220, 49914, 50607, 51302, 51998, 52693, 53387, 54082, 54776]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 7


# 技能韩服描述有改动，需要正式服上线后测试
# 护石数据暂时延用老版
class 技能8(主动技能):
    名称 = '空战机械：风暴'
    备注 = '爆炸'
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 30
    MP = [200, 1680]
    无色消耗 = 1
    data0 = [0, 434, 479, 522, 566, 610, 654, 698, 743, 786, 831, 874, 918, 962, 1007, 1050, 1095, 1139, 1182, 1226, 1271, 1314, 1359, 1403, 1447, 1490, 1534, 1578, 1622, 1667, 1710, 1755, 1798, 1842, 1886, 1931,
             1974, 2019, 2063, 2106, 2150, 2195, 2238, 2283, 2327, 2371, 2414, 2459, 2502, 2547, 2591, 2635, 2678, 2723, 2766, 2811, 2855, 2899, 2943, 2986, 3030, 3074, 3119, 3162, 3207, 3251, 3294, 3338, 3382, 3426, 3470]
    hit0 = 0
    data1 = [0, 1299, 1432, 1562, 1694, 1826, 1957, 2088, 2220, 2352, 2484, 2614, 2747, 2878, 3009, 3143, 3275, 3405, 3537, 3670, 3800, 3933, 4064, 4196, 4327, 4458, 4589, 4722, 4853, 4986, 5118, 5249, 5380, 5510, 5644,
             5776, 5907, 6039, 6171, 6301, 6433, 6567, 6697, 6829, 6961, 7092, 7223, 7356, 7488, 7619, 7750, 7881, 8013, 8146, 8277, 8409, 8539, 8671, 8804, 8935, 9068, 9200, 9331, 9462, 9594, 9724, 9858, 9989, 10120, 10252, 10383]
    hit1 = 0
    data2 = [0, 679, 749, 817, 885, 954, 1023, 1092, 1161, 1230, 1299, 1367, 1436, 1505, 1574, 1643, 1712, 1781, 1849, 1918, 1987, 2056, 2125, 2194, 2263, 2331, 2400, 2469, 2537, 2607, 2675, 2745, 2813, 2881, 2951, 3020,
             3088, 3158, 3227, 3294, 3364, 3434, 3501, 3571, 3640, 3709, 3777, 3846, 3914, 3984, 4053, 4121, 4189, 4259, 4327, 4397, 4465, 4534, 4603, 4671, 4740, 4809, 4879, 4947, 5017, 5085, 5153, 5222, 5291, 5360, 5429]
    hit2 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1
    输出时间 = 30.0

    def 装备护石(self, char):
        self.hit0 = 20
        self.power0 = 2.86
        self.power1 = 0
        self.power2 = 0

    def 手搓CD(self):
        return 0

    def 等效百分比(self, **argv):
        char = argv.get('char', {})
        self.hit0 = round(self.输出时间 / 60 * 17, 2)
        self.hit1 = round(self.输出时间 / 60 * 20, 2)
        if '空战机械：风暴' in char.护石栏:
            self.hit0 = 20
        return super().等效百分比(**argv)


class 技能9(主动技能):
    名称 = '空投支援'
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 30
    MP = [300, 2520]
    无色消耗 = 2
    data0 = [0, 959, 1057, 1154, 1252, 1348, 1446, 1543, 1641, 1738, 1835, 1933, 2029, 2127, 2223, 2322, 2419, 2516, 2613, 2712, 2808, 2906, 3002, 3101, 3197, 3295, 3392, 3490, 3587, 3685, 3781, 3880, 3976, 4074, 4170,
             4269, 4366, 4463, 4560, 4658, 4755, 4853, 4949, 5048, 5144, 5242, 5338, 5435, 5534, 5630, 5728, 5824, 5923, 6019, 6117, 6215, 6312, 6409, 6507, 6603, 6702, 6798, 6896, 6992, 7091, 7188, 7285, 7383, 7480, 7577, 7674]
    hit0 = 20
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.3


class 技能10(主动技能):
    名称 = '拦截机工厂'
    所在等级 = 45
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 45
    MP = [355, 2981]
    无色消耗 = 2
    data0 = [0, 3904, 4302, 4697, 5093, 5490, 5885, 6281, 6679, 7073, 7470, 7866, 8264, 8659, 9055, 9452, 9847, 10243, 10639, 11035, 11431, 11828, 12223, 12620, 13016, 13411, 13808, 14205, 14601, 14997, 15393, 15790, 16185, 16582, 16978, 17373,
             17770, 18166, 18561, 18957, 19355, 19751, 20146, 20543, 20940, 21335, 21732, 22128, 22523, 22920, 23317, 23712, 24108, 24505, 24901, 25296, 25692, 26089, 26484, 26881, 27278, 27673, 28070, 28467, 28862, 29258, 29654, 30052, 30447, 30843, 31240]
    hit0 = 0
    data1 = [0, 34372, 37859, 41346, 44834, 48322, 51809, 55296, 58783, 62270, 65757, 69244, 72731, 76218, 79705, 83192, 86680, 90167, 93654, 97141, 100629, 104116, 107603, 111089, 114576, 118063, 121550, 125037, 128524, 132012, 135499, 138986, 142473, 145960, 149447, 152934, 156421,
             159908, 163395, 166882, 170371, 173858, 177345, 180832, 184319, 187806, 191293, 194780, 198267, 201754, 205241, 208728, 212216, 215703, 219190, 222677, 226165, 229652, 233139, 236623, 240111, 243598, 247085, 250572, 254059, 257548, 261035, 264521, 268008, 271495, 274982]
    hit1 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.27

    def 等效百分比(self, **argv):
        char = argv.get('char', {})
        光能 = char.get_skill_by_name("光反应能量模块")
        if 光能.等级 > 0:
            self.hit0 = 0
            self.hit1 = 1
        else:
            self.hit0 = 8
            self.hit1 = 0
        return super().等效百分比(**argv)


class 技能11(被动技能):
    名称 = '光反应能量模块'
    所在等级 = 45
    等级上限 = 1
    基础等级 = 1
    关联技能 = ['拦截机工厂']
    倍率 = 1.0

    def 加成倍率(self, 武器类型):
        return self.倍率


class 技能12(被动技能):
    名称 = '斗志之歌'
    所在等级 = 48
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        if self.等级 < 17:
            return round(1.01+0.015*self.等级, 3)
        else:
            return round(1.25+0.02*(self.等级-16), 3)


class 技能13(主动技能):
    名称 = '盖波加之拳'
    所在等级 = 50
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 145
    MP = [881, 7403]
    无色消耗 = 5
    data0 = [0, 11443, 14098, 16753, 19406, 22060, 27185, 30105, 33022, 287535, 310882, 334241, 357612, 380959, 404317, 427663, 451021, 474368, 497727, 521072, 544431, 567778, 591148, 614495, 637854, 661199, 684558,
             707905, 731264, 754608, 777967, 801326, 824685, 848032, 871390, 894736, 918094, 941441, 964799, 988146, 1011505, 1034863, 1058221, 1081567, 1104926, 1128273, 1151631, 1174978, 1198336, 1221683, 1245053]
    hit0 = 1


class 技能14(主动技能):
    名称 = 'EZ10反击者'
    所在等级 = 60
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 30
    MP = [122, 1027]
    无色消耗 = 2
    data0 = [0, 11094, 12220, 13346, 14472, 15597, 16721, 17847, 18973, 20099, 21224, 22350, 23476, 24601, 25727, 26852, 27978, 29104, 30229, 31354, 32479, 33605, 34731, 35856, 36982,
             38107, 39234, 40359, 41485, 42610, 43734, 44862, 45986, 47113, 48237, 49362, 50489, 51614, 52740, 53865, 54990, 56117, 57242, 58367, 59493, 60617, 61745, 62869, 63995, 65120, 66247]
    hit0 = 1
    data1 = [0, 3698, 4074, 4449, 4825, 5199, 5573, 5949, 6323, 6699, 7074, 7450, 7824, 8201, 8575, 8951, 9326, 9702, 10076, 10452, 10826, 11202, 11576, 11952, 12327, 12702,
             13077, 13452, 13828, 14204, 14579, 14954, 15329, 15704, 16079, 16454, 16830, 17205, 17580, 17954, 18329, 18704, 19079, 19457, 19831, 20206, 20581, 20956, 21331, 21707, 22082]
    hit1 = 3
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.hit1 = 0
        self.power0 *= 3.55


class 技能15(主动技能):
    名称 = 'EXSZero毒蛇炮'
    所在等级 = 70
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 50
    MP = [218, 1830]
    无色消耗 = 2
    data0 = [0, 556, 611, 668, 723, 780, 836, 893, 948, 1006, 1062, 1118, 1174, 1231, 1286, 1343, 1398, 1456, 1513, 1569, 1625, 1682, 1737, 1793, 1850, 1906,
             1963, 2019, 2075, 2132, 2188, 2243, 2300, 2355, 2413, 2469, 2526, 2583, 2639, 2693, 2750, 2807, 2863, 2920, 2976, 3033, 3089, 3146, 3200, 3257, 3314]
    hit0 = 40
    data1 = [0, 2233, 2459, 2686, 2912, 3139, 3365, 3594, 3819, 4046, 4272, 4500, 4725, 4951, 5178, 5404, 5632, 5858, 6085, 6311, 6538, 6763, 6991, 7217, 7444, 7669,
             7898, 8124, 8349, 8577, 8803, 9030, 9255, 9483, 9709, 9935, 10161, 10390, 10616, 10842, 11069, 11296, 11521, 11749, 11975, 12200, 12428, 12654, 12882, 13107, 13334]
    hit1 = 18
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.hit1 = 20
        self.倍率 *= 1.22


class 技能16(主动技能):
    名称 = 'TN80终结者'
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 40
    MP = [580, 4500]
    无色消耗 = 3
    data0 = [0, 4238, 4669, 5098, 5529, 5959, 6388, 6819, 7249, 7678, 8108, 8538, 8968, 9398, 9829, 10258, 10688, 11119, 11548, 11979, 12408, 12837, 13268, 13698, 14128, 14558,
             14989, 15418, 15848, 16279, 16708, 17137, 17567, 17997, 18428, 18857, 19287, 19718, 20147, 20578, 21008, 21436, 21867, 22297, 22727, 23157, 23587, 24017, 24447, 24878, 25307]
    hit0 = 18
    data1 = [0, 13462, 14829, 16195, 17561, 18926, 20292, 21658, 23023, 24390, 25755, 27121, 28487, 29852, 31220, 32585, 33950, 35316, 36681, 38048, 39413, 40781, 42146, 43511, 44877,
             46242, 47609, 48975, 50340, 51707, 53072, 54438, 55803, 57168, 58536, 59901, 61268, 62633, 63998, 65364, 66730, 68097, 69462, 70828, 72194, 73559, 74926, 76291, 77658, 79023, 80388]
    hit1 = 1

    是否有护石 = 1

    def 装备护石(self, char):
        self.hit0 = 9
        self.power0 *= 2.83


class 技能17(被动技能):
    名称 = 'HS1机械助手'
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    冷却关联技能 = ['所有']
    非冷却关联技能 = ['盖波加之拳', '超时空行军', 'GW16-瓦尔德斯坦']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.18+0.02*self.等级, 3)

    def CD缩减倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return 0.85


class 技能18(主动技能):
    名称 = 'TX-45特攻队'
    所在等级 = 80
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 45
    MP = [580, 4500]
    无色消耗 = 5
    data0 = [0, 17589, 19372, 21158, 22941, 24726, 26509, 28294, 30079, 31862, 33648, 35431, 37216, 39000, 40784, 42568, 44353, 46138, 47921, 49707, 51490, 53274, 55059, 56843, 58627,
             60412, 62197, 63980, 65765, 67549, 69333, 71118, 72902, 74686, 76471, 78254, 80039, 81824, 83609, 85392, 87175, 88961, 90744, 92531, 94313, 96099, 97884, 99666, 101452, 103236, 105021]
    hit0 = 1
    data1 = [0, 11725, 12915, 14104, 15293, 16484, 17673, 18862, 20052, 21242, 22433, 23622, 24811, 26002, 27190, 28379, 29568, 30758, 31948, 33137, 34327, 35516, 36706, 37896, 39085,
             40275, 41464, 42654, 43844, 45033, 46222, 47412, 48602, 49791, 50980, 52169, 53358, 54549, 55738, 56927, 58118, 59308, 60497, 61687, 62876, 64067, 65256, 66445, 67635, 68824, 70014]
    hit1 = 1
    data2 = [0, 11725, 12915, 14104, 15293, 16484, 17673, 18862, 20052, 21242, 22433, 23622, 24811, 26002, 27190, 28379, 29568, 30758, 31948, 33137, 34327, 35516, 36706, 37896, 39085,
             40275, 41464, 42654, 43844, 45033, 46222, 47412, 48602, 49791, 50980, 52169, 53358, 54549, 55738, 56927, 58118, 59308, 60497, 61687, 62876, 64067, 65256, 66445, 67635, 68824, 70014]
    hit2 = 1
    data3 = [0, 8794, 9687, 10578, 11470, 12363, 13256, 14146, 15039, 15931, 16824, 17716, 18608, 19500, 20392, 21284, 22177, 23068, 23961, 24853, 25746, 26636, 27529, 28421, 29315,
             30205, 31098, 31990, 32882, 33774, 34667, 35559, 36451, 37343, 38236, 39126, 40020, 40912, 41805, 42695, 43588, 44480, 45373, 46264, 47157, 48050, 48941, 49833, 50726, 51617, 52510]
    hit3 = 1
    data4 = [0, 8794, 9687, 10578, 11470, 12363, 13256, 14146, 15039, 15931, 16824, 17716, 18608, 19500, 20392, 21284, 22177, 23068, 23961, 24853, 25746, 26636, 27529, 28421, 29315,
             30205, 31098, 31990, 32882, 33774, 34667, 35559, 36451, 37343, 38236, 39126, 40020, 40912, 41805, 42695, 43588, 44480, 45373, 46264, 47157, 48050, 48941, 49833, 50726, 51617, 52510]
    hit4 = 1

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.29


class 技能19(主动技能):
    名称 = '超时空行军'
    所在等级 = 85
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 180
    MP = [2500, 8000]
    无色消耗 = 10
    data0 = [0, 26055, 32105, 38144, 44186, 50227, 56271, 62312, 68354, 74393, 80439, 86479, 92520, 98562, 104610, 110655, 116693, 122732, 128778, 134821, 140862, 146905, 152945, 158990, 165028, 171071,
             177117, 183161, 189202, 195244, 201283, 207329, 213371, 219413, 225455, 231496, 237541, 243579, 249621, 255668, 261710, 267752, 273795, 279836, 285879, 291917, 297965, 304007, 310046, 316092, 322130]
    hit0 = 9


class 技能20(主动技能):
    名称 = 'HS1全息机械猎手'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 60
    MP = [773, 6000]
    无色消耗 = 7
    data0 = [0, 175693, 193518, 211341, 229166, 246990, 264813, 282637, 300459, 318285, 336110, 353933, 371758, 389581, 407404, 425228, 443054, 460877, 478702, 496524, 514348, 532173, 549996, 567821, 585644, 603468,
             621291, 639117, 656940, 674765, 692590, 710412, 728236, 746059, 763884, 781709, 799532, 817357, 835180, 853004, 870828, 888653, 906475, 924301, 942122, 959948, 977772, 995597, 1013420, 1031245, 1049067]
    hit0 = 1


class 技能21(被动技能):
    名称 = 'SOPHIA'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.18 + 0.02 * self.等级, 5)


class 技能22(主动技能):
    名称 = 'GW16-瓦尔德斯坦'
    所在等级 = 100
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 290
    MP = [4028, 12889]
    无色消耗 = 15
    data0 = [0, 129926, 160055, 190182, 220309, 250437, 280564, 310694, 340820, 370949, 401076, 431204, 461333, 491461, 521589, 551716, 581844, 611970, 642100, 672227, 702356, 732482, 762612, 792739, 822867, 852994, 883123,
             913249, 943379, 973506, 1003633, 1033761, 1063889, 1094018, 1124145, 1154273, 1184400, 1214528, 1244656, 1274785, 1304912, 1335040, 1365168, 1395294, 1425424, 1455551, 1485679, 1515806, 1545935, 1576062, 1606191]
    hit0 = 1
    data1 = [0, 4640, 5717, 6792, 7868, 8945, 10020, 11095, 12173, 13247, 14325, 15400, 16476, 17552, 18628, 19703, 20781, 21855, 22932, 24008, 25083, 26160, 27236, 28313, 29388, 30465,
             31540, 32617, 33692, 34768, 35844, 36921, 37996, 39072, 40149, 41224, 42300, 43376, 44451, 45529, 46603, 47680, 48756, 49832, 50907, 51985, 53059, 54135, 55212, 56287, 57364]
    hit1 = 7
    data2 = [0, 194888, 240080, 285274, 330463, 375656, 420849, 466041, 511232, 556423, 601616, 646807, 691999, 737191, 782382, 827574, 872767, 917957, 963149, 1008341, 1053534, 1098724, 1143916, 1189108, 1234300, 1279491,
             1324683, 1369875, 1415067, 1460259, 1505449, 1550642, 1595834, 1641026, 1686217, 1731409, 1776601, 1821792, 1866984, 1912176, 1957367, 2002560, 2047751, 2092942, 2138134, 2183328, 2228520, 2273710, 2318902, 2364094, 2409284]
    hit2 = 1
    data3 = [0, 20881, 25723, 30565, 35406, 40248, 45090, 49933, 54775, 59618, 64457, 69299, 74143, 78985, 83827, 88669, 93510, 98353, 103195, 108037, 112879, 117720, 122562, 127405, 132246, 137088,
             141930, 146771, 151614, 156456, 161298, 166140, 170982, 175824, 180666, 185508, 190351, 195191, 200032, 204876, 209718, 214560, 219402, 224245, 229086, 233928, 238770, 243612, 248454, 253297, 258137]
    hit3 = 14

# region G系暂不实现

# class 技能23(主动技能):
#     名称 = 'G1科罗纳'
#     备注 = '(秒伤)'
#     所在等级 = 20
#     等级上限 = 70
#     学习间隔 = 2
#     等级精通 = 60
#     MP = [60, 504]
#     关联技能 = ['G2旋雷者', 'G3捕食者']
#     data0 = [int(i) for i in [0, 162, 179, 195, 212, 229, 245, 262, 278, 295, 311, 328, 344, 361, 377, 394, 410, 427, 443, 460, 476, 493, 509, 526, 543, 559, 576, 592, 609, 625, 642, 658, 675, 691, 708, 724, 741, 757, 774, 790, 807, 824, 840, 857, 873, 890, 906, 923, 939, 956, 972, 989, 1005, 1022, 1038, 1055, 1071, 1088, 1104, 1121, 1138, 1154, 1171, 1187, 1204, 1220, 1237, 1253, 1270, 1286, 1303]]
#     hit0 = 2 #每0.5s一次
#     #攻击间隔 = 0.5
#     #G123切换CD为7s
#     TP成长 = 0.10
#     TP上限 = 7
#     CD = 50.0 #召唤冷却

#     def 等效CD(self, 武器类型, 输出类型):
#         return round(1, 1)

#     def 加成倍率(self,武器类型):
#         if self.等级 == 0:
#             return 0.0
#         else:
#             return round(0.59+0.01*self.等级, 5)


# class 技能24(主动技能):
#     名称 = 'G2旋雷者'
#     备注 = '(秒伤)'
#     所在等级 = 25
#     等级上限 = 70
#     学习间隔 = 2
#     等级精通 = 60
#     MP = [40, 336]
#     关联技能 = ['G1科罗纳', 'G3捕食者']
#     # 静电 近身
#     data0 = [int(i) for i in [0, 162, 179, 195, 212, 229, 245, 262, 278, 295, 311, 328, 344, 361, 377, 394, 410, 427, 443, 460, 476, 493, 509, 526, 543, 559, 576, 592, 609, 625, 642, 658, 675, 691, 708, 724, 741, 757, 774, 790, 807, 824, 840, 857, 873, 890, 906, 923, 939, 956, 972, 989, 1005, 1022, 1038, 1055, 1071, 1088, 1104, 1121, 1138, 1154, 1171, 1187, 1204, 1220, 1237, 1253, 1270, 1286, 1303]]
#     hit0 = 0 #每s三次
#     # 攻击间隔0 = 1/3

#     # 电波 远程
#     data1 = [int(i) for i in [0, 162, 179, 195, 212, 229, 245, 262, 278, 295, 311, 328, 344, 361, 377, 394, 410, 427, 443, 460, 476, 493, 509, 526, 543, 559, 576, 592, 609, 625, 642, 658, 675, 691, 708, 724, 741, 757, 774, 790, 807, 824, 840, 857, 873, 890, 906, 923, 939, 956, 972, 989, 1005, 1022, 1038, 1055, 1071, 1088, 1104, 1121, 1138, 1154, 1171, 1187, 1204, 1220, 1237, 1253, 1270, 1286, 1303]]
#     hit1 = 3/2 #每2.0s一次
#     # 攻击间隔1 = 1/2

#     CD = 6.0 #技能本身没有CD，此处为上一任作者写的
#     TP成长 = 0.10
#     TP上限 = 7

#     形态 = ["电波(远程)", "静电(近身)"]

#     def 形态变更(self, 形态, char:Character):
#         if 形态 == '' and len(self.形态) > 0:
#             形态 = self.形态[0]
#             if 形态 == "电波(远程)":
#                 self.hit0 = 0
#                 self.hit1 = 3
#             if 形态 == "静电(近身)":
#                 self.hit0 = 6.0*3
#                 self.hit1 = 0

#     def 等效CD(self, 武器类型, 输出类型):
#         return round(6, 1)

#     def 加成倍率(self,武器类型):
#         if self.等级 == 0:
#             return 0.0
#         else:
#             return round(0.50+0.01*self.等级, 5)

# class 技能25(主动技能):
#     名称 = 'G3捕食者'
#     备注 = '秒伤'
#     所在等级 = 30
#     等级上限 = 70
#     学习间隔 = 2
#     等级精通 = 60
#     MP = [50, 420]
#     关联技能 = ['G1科罗纳', 'G2旋雷者']
#     data0 = [int(i) for i in [0, 116, 128, 140, 152, 164, 176, 187, 199, 211, 223, 235, 247, 258, 270, 282, 294, 306, 318, 330, 341, 353, 365, 377, 389, 401, 412, 424, 436, 448, 460, 472, 484, 495, 507, 519, 531, 543, 555, 566, 578, 590, 602, 614, 626, 638, 649, 661, 673, 685, 697, 709, 720, 732, 744, 756, 768, 780, 792, 803, 815, 827, 839, 851, 863, 874, 886, 898, 910, 922, 934]]
#     hit0 = 2/0.5 #每0.5s2次
#     # 攻击间隔0 = 0.5
#     CD = 1 #技能本身没有CD，此处为上一任作者写的
#     TP成长 = 0.10
#     TP上限 = 7

#     def 等效CD(self, 武器类型, 输出类型):
#         return round(1, 1)

#     def 加成倍率(self,武器类型):
#         if self.等级 == 0:
#             return 0.0
#         else:
#             return round(0.48+0.01*self.等级, 3)

# endregion

class classChange(Character):
    def __init__(self, equVersion=""):
        self.实际名称 = 'mechanic_male'
        self.名称 = '重霄·机械师'
        self.角色 = '神枪手(男)'

        self.职业 = '机械师'
        # 用来筛CP武器的
        self.转职 = '机械师(男)'
        self.武器选项 = ['自动手枪']
        self.输出类型选项 = ['魔法百分比']
        self.防具精通属性 = ['智力']
        self.类型 = '魔法百分比'
        self.武器类型 = '自动手枪'
        self.防具类型 = '布甲'
        技能列表 = []
        技能序号 = {}
        i = 0
        while i >= 0:
            try:
                tem = eval('技能'+str(i)+'()')
                tem.基础等级计算()
                技能序号[tem.名称] = i
                技能列表.append(tem)
                i += 1
            except:
                i = -1
        self.技能栏 = 技能列表
        self.技能序号 = 技能序号
        self.buff = 1.85

        super().__init__(equVersion)

    def set_individuation(self, info):
        info['char_optiopns'] = [
            {
                "name": " [空战机械：风暴] ",
                "option": ["单次输出 {} 秒".format(str(i)) for i in range(1, 61)]
            }
        ]

    def 职业特殊设置(self):
        self.get_skill_by_name("空战机械：风暴").输出时间 = self.get_individuation(0) + 1

    def 伤害计算(self):

        data = super().伤害计算()
        skill_dict = data['skills']

        RX78追击者 = self.get_skill_by_name("RX78追击者")
        if 'RX78追击者' in skill_dict and RX78追击者.等级 > 0 and RX78追击者.CP倍率 > 0:
            info = data['skills']['RX78追击者']
            avg = info['damage'] / info['count']
            count = 0
            for skill in skill_dict:
                追加 = self.get_skill_by_name(skill).追加
                count += data['skills'][skill]['count'] * 追加
            data['skills']['RX78追击者']['count'] += count
            data['skills']['RX78追击者']['damage'] += avg * RX78追击者.CP倍率 * count
            data['total_data'] += avg * RX78追击者.CP倍率 * count
        dps = 0
        for temp in data['skills']:
            skill = data['skills'][temp]
            try:
                dps += (skill['damage']/skill['count'])/skill['cd']
            except:
                pass
        data['dps'] = dps
        return data
